Flexible PDO Mapping

Dynamic PDO mapping allows for customizing the PDOs to fit customer needs. There is no performance impact using flexible mapping vs fixed mapping. Flexible mapping allows for greater flexibility and is preferred over using the fixed maps when possible. Some EtherCAT masters may be unable to use flexible mappings.

Objects available for PDO mappings are listed in the object dictionary table.

Restrictions of flexible mapping

Depending on the desired cycle time, the number of total mapped objects in each direction are limited to the following:

  • 1 ms and faster

    • Write Direction (RxPDOs): The sum and total of the number of the mapped object count of all 4 RxPDOs is limited to 14 mapped objects.

    • Read Direction (TxPDOs): The sum and total of the number of the mapped object count of all 4 TxPDOs is limited to 14 mapped objects.

  • 2 ms and slower

    • Write Direction (RxPDOs): The sum and total of the number of the mapped object count of all 4 RxPDOs is limited to 30 mapped objects.

    • Read Direction (TxPDOs): The sum and total of the number of the mapped object count of all 4 TxPDOs is limited to 30 mapped objects.

Examples of valid flexible PDO mapping

Example 1: Bus Rate = 1msec
Write Direction Read Direction
RxPDOs Mapped Object Count TxPDOs Mapped Object Count
1600 5 1A00 8
1601 5 1A01 4
1602 4 1A02 1
1603 0 1A03 1
Total 14 Total 14
Example 2: Bus Rate = 1msec
Write Direction Read Direction
RxPDOs Mapped Object Count TxPDOs Mapped Object Count
1600 14 1A00 14
1601 0 1A01 0
1602 0 1A02 0
1603 0 1A03 0
Total 14 Total 14
Example 3: Bus Rate = 2msec
Write Direction Read Direction
RxPDOs Mapped Object Count TxPDOs Mapped Object Count
1600 10 1A00 8
1601 10 1A01 7
1602 5 1A02 10
1603 5 1A03 5
Total 30 Total 30
Example 4: Bus Rate = 2msec
Write Direction Read Direction
RxPDOs Mapped Object Count TxPDOs Mapped Object Count
1600 30 1A00 30
1601 0 1A01 0
1602 0 1A02 0
1603 0 1A03 0
Total 30 Total 30

Configuring Flexible Maps

  1. Clear the mapping selection to enable it to be changed (write 0 to object 1C12h RxPDO assignment sub 0 and 1C13h TxPDO assignment sub 0)
    • Objects can be mapped to 1600-1603h for drive outputs and 1A00h-1A03h for inputs. Each index is a separate PDO.
    • Write 0 to sub-index 0 to clear the PDO map and permit updating
    • Write each following sub-index with the desired object entry
    • Write the number of objects back to sub-index 0 to complete the mapping
    • If any objects are not PDO mappable, an error will be received
  2. Write 1C12h sub 1 to 4 with thePDOs (1600h RxPDO mapping parameter 1 - 1603h RxPDO mapping parameter 4 ) that should be used in receive direction of the drive (set point values).
  3. Write 1C13h sub 1 to 4 with the PDOs (1A00h TxPDO mapping parameter 1 - 1A03h TxPDO mapping parameter 4) that should be used in transmit direction of the drive (actual values).
  4. Write 1C12h sub 0 and 1C13h sub 0 with the number of mapped PDOs that were setup.

Padding Objects

The AKD2G uses byte alignment on PDOs. This means the AKD2G allows mapping a 1 byte object to a PDO Mapping odd numbers of bytes or even numbers of bytes to a PDO is allowed.

If more than byte alignment is required, padding objects can be inserted into PDO maps. This is achieved by mapping index 0000h sub 0 and specifying the size. For example, setting a PDO entry with 00000010h assigns 16 bits of padding (2 bytes) and 00000008h assigns 8 bits of padding (1 byte). The smallest amount of padding allowed is 1 byte.

Mapping a 1 byte object with a 1 byte padding object can be used to keep a consistent data size of the PDO data and the PLC program variable/tag for a program that may use different drives (Eg.AKD and AKD2G). For example, if object 6060h (1 byte) was mapped to a PDO along with a padding object of 1 byte (2 bytes together) in another drive (AKD, etc.), the same concept can be used in the AKD2G.

TwinCAT 3 Dynamic PDO Example

The cyclic data is visible in the PDO-assignment window for the Inputs and Outputs of the Sync Managers. The default PDO settings use the dynamic PDOs 1600h RxPDO mapping parameter 1/1A00h TxPDO mapping parameter 1 for axis 1 and on dual axis drives 1601h/1A01h are mapped for axis 2 with the objects necessary for cyclic synchronous position mode control.

The PDO maps can be changed by selecting the desired PDO and right clicking in the PDO content window. Existing entries can be changed or deleted, and new entries can be inserted between existing or appended to the end.

A list of mappable objects is shown. The list only shows objects that can be mapped in the direction of the map being changed. For example, attempting to insert an object on the input PDO 1A00h only shows objects that can be mapped in the direction from the drive to the controller, as shown below.

As the PDO map is changed, the startup script is automatically updated by TwinCAT to send to the drive during the PREOP to SAFEOP transition.

The meaning of the data (for example 0x60410010 in the mapping of 1A00h sub 1) is as follows:

  • 6041h is the index of the DS402 statusword.
  • 00h is the sub-index of the DS402 statusword.
  • 10h is the number of bits for this entry, i.e., 16 bits or 2 bytes.